import { Injectable } from '@angular/core';
import { RequestClass } from './request.service';
@Injectable()
export class HomeService {
    constructor(private requestclass: RequestClass) {}
    fetchMounthCostByYear = async ({ year }) => {
        return await this.requestclass.request.get('/home/monthconsumed', {
            params: {
                year,
            },
        });
    };
    fetchCostRank = async ({ year }) => {
        return await this.requestclass.request.get('/home/rankwaterconsumed', {
            params: {
                year,
            },
        });
    };
    fetchWaterCostByYear = async ({ year }) => {
        return await this.requestclass.request.get('/home/waterconsumed', {
            params: {
                year,
            },
        });
    };
    fetchMounthCostByYearAndWell = async ({ year, id }) => {
        return await this.requestclass.request.get(
            '/wellinfo/findmonthvolumebyyear',
            {
                params: {
                    year,
                    wellId: id,
                },
            }
        );
    };
    fetchWellInstalled = async () => {
        return await this.requestclass.request.get('/home/getwellStatusCounts');
    };
}
